import re


def JiLin_menus_special(tag, current_url, title):
    index = None
    for tag_name in ['href', 'data-url', 'data-href', 'data-uri', 'data-showhref']:
        if tag.get_attribute(tag_name) and all(x not in tag.get_attribute(tag_name).lower()
                                               for x in ["iframe", "javascript"]):
            index = tag.get_attribute(tag_name)
            break
    if not index:
        text = tag.get_attribute('onclick')
        if not text:
            return None
        regexp = re.findall(r'ticaiSearch\((\d+),(\d+)', text)
        if regexp:
            code, num = regexp[0]
        else:
            code = title
            num = 4
        if '?' in current_url:
            index = current_url.replace(current_url.split('?')[1],  f'stit={code}&num={num}')
        else:
            index = f'{current_url}?stit={code}&num={num}'
    return index
